# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Contributor: Windel Bouwman <windel at windel dot nl>
# Contributor: Jakub Klinkovský <kuba.klinkovsky@gmail.com>

_pkgname=pyqtgraph
pkgname=python-$_pkgname
pkgver=0.13.3
pkgrel=2
pkgdesc='Scientific Graphics and GUI Library for Python'
arch=('any')
url='http://www.pyqtgraph.org'
license=('MIT')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
depends=('python' 'qt5-python-bindings' 'python-numpy')
optdepends=('python-opengl: 3d graphics')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/pyqtgraph/pyqtgraph/archive/pyqtgraph-$pkgver.tar.gz")
sha512sums=('a397fcf8fc2fcc5a212df9f4cd48dc07bc1ad9eb7a9b1283488eb52c236e054b01df02d04088a9d91679c4ae3ab7796cdf95cdbad06a6a585fbbcdb921f33617')

build() {
  cd $_pkgname-$_pkgname-$pkgver

  python -m build -nw
}

package() {
  cd $_pkgname-$_pkgname-$pkgver

  python -m installer -d "$pkgdir" dist/*.whl

  install -Dm 644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
